#include <algorithm>
#include <iostream>
#include <iterator>
#include <vector>
void rotateArray(std::vector<int> &vec, int k = 2) {
  reverse(vec.begin(), vec.end());
  auto iterk = vec.begin();
  advance(iterk, k);
  reverse(vec.begin(), iterk);
  reverse(iterk, vec.end());
}